package com.ncloud.crm.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ncloud.common.enmus.ResultEnum;
import com.ncloud.common.exception.UserException;
import com.ncloud.crm.entity.BsContract;
import com.ncloud.crm.mapper.BsContractMapper;
import com.ncloud.crm.service.BsContractService;

@Service
public class BsContractServiceImpl implements BsContractService {
	
	private static final Logger logger = LogManager.getLogger(BsContractServiceImpl.class);
	@Autowired
	private BsContractMapper contractMapper;
	
	@Override
	public void insertContract(BsContract contract) {
		contractMapper.insertContract(contract);
	}
	
	@Override
	public void updateContract(BsContract contract) {
		contractMapper.updateContract(contract);
	}

	@Override
	public List<Map<String, Object>> getContractsBySale(Long saleId) {
		return contractMapper.getBsContractsBySale(saleId);
	}
}
